package terminal_enum

// 终端-终端扩展指令类型
type terminalExtInstructionType int

var TerminalExtInstructionType terminalExtInstructionType

// 锁车
func (c *terminalExtInstructionType) LockCar() int {
	return 1
}

// 限速
func (c *terminalExtInstructionType) LimitSpeed() int {
	return 2
}

// 限举
func (c *terminalExtInstructionType) LimitLift() int {
	return 3
}

func (c *terminalExtInstructionType) ToText(value int) string {
	switch value {

	case 1:
		return "锁车"

	case 2:
		return "限速"

	case 3:
		return "限举"

	}
	return ""
}

func (c *terminalExtInstructionType) ToValue(text string) int {
	switch text {

	case "锁车":
		return 1

	case "限速":
		return 2

	case "限举":
		return 3

	}
	return 0
}
